home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / LGP250S1.ZIP / src / libgplus.5 / libgplus / makefile.in < prev    next >
Makefile  |  1993-10-24  |  6KB  |  211 lines

  1. # Makefile for GNU C++ class library (libg++)
  2. #   Copyright (C) 1989, 1992, 1993 Free Software Foundation, Inc.
  3. #   written by Doug Lea (dl@rocky.oswego.edu)
  4.  
  5. #This file is part of GNU libg++.
  6.  
  7. #GNU libg++ is free software; you can redistribute it and/or modify
  8. #it under the terms of the GNU General Public License as published by
  9. #the Free Software Foundation; either version 1, or (at your option)
  10. #any later version.
  11.  
  12. #GNU libg++ is distributed in the hope that it will be useful,
  13. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. #GNU General Public License for more details.
  16.  
  17. #You should have received a copy of the GNU General Public License
  18. #along with GNU libg++; see the file COPYING.  If not, write to
  19. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. srcdir = .
  22.  
  23. # We specify exactly what we want to pass down; don't let GNU make
  24. # 3.63 overload the command line.
  25. MAKEOVERRIDES=
  26.  
  27. ###**######################################################################
  28. #
  29. # Directories, paths, compilation flags and program names.
  30. #
  31. # If a macro needs to have a different value, then change it in the
  32. # site/architecture specific makefile in the directory config !
  33. #
  34. # This file contains the documentation for the macros and possible values.
  35. # Don't remove them even, if they are only comments !
  36.  
  37. VERSION = 2.5
  38. LIBG++_DIST_VERSION = $(VERSION)
  39.  
  40. # needed only for shared libraries on SunOS 4; the number must consist of
  41. # <major number>.<minor number>
  42. LIBG++_VERSION = 140.4
  43.  
  44. # ------- System-dependent defines
  45.  
  46. # g++ so specific flags
  47. OSFLAG=
  48.  
  49. # ld or ld++ os specific libraries
  50. #OSLIBS =
  51.  
  52. # Comment out the next line to disable incremental linking test
  53. # (this test NOT included in 1.39.0, so don't re-enable) ??? H.S.
  54. #TEST0=test0
  55. #TEST0=
  56.  
  57. # targets for test-install
  58. TEST_INSTALL         = test-90S-then-clean # test-90D-then-clean
  59. VERIFY_GXX_INSTALLATION = foo_main # dfoo_main
  60.  
  61.  
  62. # You can override gperf to not build it at all
  63. GPERF = gperf
  64. NON_IO_SUBDIRS    =  genclass src $(GPERF) utils tests etc test-install
  65. SUBDIRS    =  $(NON_IO_SUBDIRS)
  66. ALL_SUBDIRS = $(NON_IO_SUBDIRS) old-stream no-stream
  67.  
  68. ALL    =  verify-gxx-installation genclass src $(GPERF) $(UTILS)
  69. CHECK    =  tests etc etc-tests
  70. UTILS   =  # utils
  71.  
  72. # C++ compiler to use when testing that installation has succeeded.
  73. INSTALLED_CXX=$(bindir)/gcc
  74.  
  75. TARGETLIB = libg++.a
  76.  
  77. # Used to insert objects from libiberty into libg++.a.
  78. LIBIBERTY = libiberty
  79. LIBIBERTY_OBJECTS_TO_GET = `cat needed-list` strerror.o strsignal.o
  80.  
  81. #### package, host, target, and site dependent Makefile fragments come in here.
  82. ##
  83.  
  84. tooldir = $(exec_prefix)/$(target)
  85. INSTALLDIR = $(libdir)
  86.  
  87. ###**######################################################################
  88. #
  89. # compilation actions
  90.  
  91. .PHONY: rest-in-parallel in-src in-io
  92. rest-in-parallel: .stmp-genclass .stmp-tests .stmp-etc .stmp-gperf .stmp-utils
  93.  
  94. # We assume libiberty is made before .
  95. $(TARGETLIB): in-io in-src stamp-$(TARGETLIB)
  96.  
  97. stamp-$(TARGETLIB): src/libgxx.list $(IO_DIR)/iostream.list ../$(LIBIBERTY)/libiberty.a
  98.     -rm -f $(TARGETLIB)
  99.     rootme=`pwd`/ ; export rootme ; cd src ; \
  100.       $(AR) $(AR_FLAGS) ../$(TARGETLIB) `cat libgxx.list`
  101.     cd $(IO_DIR); \
  102.       $(AR) $(AR_FLAGS) ../libg++/$(TARGETLIB) `cat iostream.list`
  103.     cd ../$(LIBIBERTY); \
  104.       $(AR) $(AR_FLAGS) ../libg++/$(TARGETLIB) $(LIBIBERTY_OBJECTS_TO_GET)
  105.     $(RANLIB) $(TARGETLIB)
  106.     @touch stamp-$(TARGETLIB)
  107.  
  108. src/libgxx.list: in-src
  109. in-src:
  110.     @rootme=`pwd`/ ; export rootme ; cd src ; \
  111.         $(MAKE) $(FLAGS_TO_PASS) libgxx.list
  112.  
  113. $(IO_DIR)/iostream.list: in-io
  114. in-io:
  115.     @rootme=`pwd`/ ; export rootme ; cd $(IO_DIR) ; \
  116.         $(MAKE) $(FLAGS_TO_PASS) iostream.list
  117.  
  118. in-libiberty:
  119.     @rootme=`pwd`/ ; export rootme ; cd ../$(LIBIBERTY) ; \
  120.         $(MAKE) $(FLAGS_TO_PASS)
  121.  
  122. .PHONY: installcheck
  123. installcheck: check
  124.  
  125. .stmp-genclass: $(TARGETLIB)
  126.     @rootme=`pwd`/ ; export rootme ; cd genclass ; \
  127.       $(MAKE) $(FLAGS_TO_PASS) "gxx_includedir=$(gxx_includedir)"
  128.     touch $@
  129.  
  130. .stmp-tests: $(TARGETLIB)
  131.     @rootme=`pwd`/ ; export rootme ; cd tests ; \
  132.       $(MAKE) $(FLAGS_TO_PASS)
  133.     touch $@
  134.  
  135. .stmp-etc: $(TARGETLIB)
  136.     @rootme=`pwd`/ ; export rootme ; cd etc ; \
  137.       $(MAKE) $(FLAGS_TO_PASS)
  138.     touch $@
  139.  
  140. .stmp-gperf: $(TARGETLIB)
  141.     @if [ "x$(GPERF)" != "x" ]; then \
  142.        rootme=`pwd`/ ; export rootme ; cd $(GPERF) ; \
  143.           $(MAKE) $(FLAGS_TO_PASS); \
  144.      else true; fi
  145.     touch $@
  146.  
  147. .stmp-utils: $(TARGETLIB)
  148.     @if [ "x$(UTILS)" != "x" ]; then \
  149.        rootme=`pwd`/ ; export rootme ; cd $(UTILS) ; \
  150.          $(MAKE) $(FLAGS_TO_PASS); \
  151.      else true; fi
  152.     touch $@
  153.  
  154. #
  155. #
  156. # Installation
  157. #
  158.  
  159. .PHONY: install
  160. install:
  161.     $(INSTALL_DATA) $(TARGETLIB) $(INSTALLDIR)/$(TARGETLIB)
  162.     $(RANLIB) $(INSTALLDIR)/$(TARGETLIB)
  163.     chmod a-x $(INSTALLDIR)/$(TARGETLIB)
  164.     cd $(srcdir)/src; \
  165.     for FILE in *.h gen/*.ccP gen/*.hP; do \
  166.         rm -f $(gxx_includedir)/$$FILE ; \
  167.         $(INSTALL_DATA) $$FILE $(gxx_includedir)/$$FILE || exit 1; \
  168.         chmod a-x,a+r $(gxx_includedir)/$$FILE ; \
  169.     done
  170.     if [ -n "$(WRAP_C_INCLUDES)" ]; then \
  171.         cd $(srcdir)/g++-include; \
  172.         for FILE in *.h sys/*.h; do \
  173.         rm -f $(gxx_includedir)/$$FILE ; \
  174.         $(INSTALL_DATA) $$FILE $(gxx_includedir)/$$FILE || exit 1; \
  175.         chmod a-x,a+r $(gxx_includedir)/$$FILE ; \
  176.         done; \
  177.     else true ; \
  178.     fi
  179.     if [ "x$(GPERF)" != "x" ]; then \
  180.       cd gperf ; $(MAKE) $(FLAGS_TO_PASS) install; \
  181.     else true; fi
  182.     @for D in genclass $(UTILS) ; do \
  183.         if [ -d $$D ] ; then \
  184.             (cd $$D; $(MAKE) $(FLAGS_TO_PASS) "gxx_includedir=$(gxx_includedir)" install) ; \
  185.         else true ; \
  186.         fi ; \
  187.     done
  188.  
  189. installcheck:
  190.     if [ "x$(TEST_INSTALL)" != "x" ]; then \
  191.       cd test-install; $(MAKE) $(TEST_INSTALL) \
  192.           CXX=$(INSTALLED_CXX) "CXXFLAGS=$(CXXFLAGS)" \
  193.           COMPILE_FLAGS="" LIBS=-lg++; \
  194.     else true; fi
  195.  
  196. DIST_NAME = libg++-$(LIBG++_DIST_VERSION)
  197.  
  198. $(DIST_NAME).tar.gz: dist
  199.  
  200. # Making a dist:
  201. # cvs rtag libgxx-x-yy libg++
  202. # cvs co -r libgxx-x-yy libg++
  203. # Sanitize
  204. # cd {HERE}/..
  205. # make -f Makefile.in libg++.tar.gz
  206.  
  207. diststuff: info
  208.  
  209. force:
  210. .PHONY: $(SUBDIRS) dist
  211.